<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>{{title}}</title>
    <style>
      /* 通用内联样式（大部分客户端支持） */
      body {
        margin: 0;
        padding: 0;
        background-color: #f6f9fc;
        color: #2f3542;
        font-family:
          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Microsoft YaHei", "PingFang SC",
          "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
      }
      a {
        color: #3869d4;
        text-decoration: none;
      }
      .btn {
        display: inline-block;
        background-color: #3869d4;
        color: #ffffff !important;
        padding: 12px 20px;
        border-radius: 6px;
        font-weight: 600;
      }
      .container {
        width: 100%;
        background-color: #f6f9fc;
        padding: 24px 0;
      }
      .card {
        max-width: 600px;
        margin: 0 auto;
        background: #ffffff;
        border-radius: 10px;
        border: 1px solid #e6ecf1;
        box-shadow: 0 2px 6px rgba(50, 50, 93, 0.05);
        overflow: hidden;
      }
      .header {
        padding: 18px 24px;
        background: #ffffff;
        border-bottom: 1px solid #eef2f6;
        font-size: 18px;
        font-weight: 700;
        color: #1f2937;
        text-align: left;
      }
      .content {
        padding: 24px;
        line-height: 1.7;
        font-size: 15px;
      }
      .title {
        margin: 0 0 8px 0;
        font-size: 20px;
        font-weight: 700;
        color: #111827;
      }
      .greeting {
        margin: 16px 0 8px 0;
        font-weight: 600;
        color: #111827;
      }
      .action {
        margin: 24px 0;
        text-align: center;
      }
      .footer {
        max-width: 600px;
        margin: 12px auto 0;
        color: #6b7280;
        font-size: 12px;
        text-align: center;
      }
      .muted {
        color: #6b7280;
      }
      .hr {
        border: none;
        border-top: 1px solid #eef2f6;
        margin: 24px 0;
      }
      @media (max-width: 620px) {
        .content {
          padding: 18px;
        }
        .header {
          padding: 14px 18px;
        }
      }
    </style>
  </head>
  <body>
    <div class="container">
      <table class="card" role="presentation" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <td class="header">
            {{appName}}
          </td>
        </tr>
        <tr>
          <td class="content">
            <h1 class="title">{{title}}</h1>

            <p class="greeting">你好{{#if name}}，{{name}}{{/if}}！</p>

            <p>欢迎加入
              {{appName}}。我们已为你创建账户并完成初始化设置。接下来，你可以点击下方按钮完成关键步骤，开始你的体验。</p>

            <div class="action">
              <a class="btn" href="{{actionUrl}}" target="_blank" rel="noopener">
                {{buttonText}}
              </a>
            </div>

            <p class="muted">如果按钮无法点击，请将以下链接复制到浏览器打开：</p>
            <p><a href="{{actionUrl}}" target="_blank" rel="noopener">{{actionUrl}}</a></p>

            {{#if extraNote}}
              <hr class="hr" />
              <p class="muted">{{extraNote}}</p>
            {{/if}}

            <hr class="hr" />
            <p class="muted">如需帮助，请联系：<a href="mailto:{{supportEmail}}">{{supportEmail}}</a></p>
          </td>
        </tr>
      </table>

      <div class="footer">
        <p>© {{year}} {{appName}} · 保留所有权利</p>
        {{#if unsubscribeUrl}}
          <p><a href="{{unsubscribeUrl}}" target="_blank" rel="noopener">退订或管理邮件偏好</a></p>
        {{/if}}
      </div>
    </div>
  </body>
</html>